<?php
namespace App\Params\H5;
use App\Common\Constant;
use App\Params\Param;
/**
 * 创建订单参数
 *
 * @author: WangBin
 * @date: 2021/7/26
 * @mail: <849850352@qq.com>
 */
class OrderCreateParams extends Param
{
    public $coupon_id;
    public $customer_id;
    public $mode;
    public $pay_type;
    public $order_from = Constant::ORDER_FROM_H5;
    public $remo = '';

    public function rules()
    {
        return [
            'coupon_id' => 'nullable|integer',
            'mode' => 'required|string|in:cart,fast_buy',
            'pay_type' => 'required|string',
            'order_from' => 'nullable|string',
            'remo' => 'nullable|string'
        ];
    }

    /**
     * @return string
     */
    public function getRemo(): string
    {
        return (string)$this->remo;
    }

    /**
     * @param string $remo
     */
    public function setRemo(string $remo): void
    {
        $this->remo = $remo;
    }

    /**
     * @return string
     */
    public function getOrderFrom(): string
    {
        return $this->order_from;
    }

    /**
     * @param string $order_from
     */
    public function setOrderFrom(string $order_from): void
    {
        $this->order_from = $order_from;
    }

    /**
     * @return mixed
     */
    public function getPayType()
    {
        return $this->pay_type;
    }

    /**
     * @param mixed $pay_type
     */
    public function setPayType($pay_type): void
    {
        $this->pay_type = $pay_type;
    }

    /**
     * @return mixed
     */
    public function getMode()
    {
        return $this->mode;
    }

    /**
     * @param mixed $model
     */
    public function setMode($mode): void
    {
        $this->mode = $mode;
    }

    /**
     * @return mixed
     */
    public function getCouponId()
    {
        return $this->coupon_id;
    }

    /**
     * @param mixed $coupon_id
     */
    public function setCouponId($coupon_id): void
    {
        $this->coupon_id = $coupon_id;
    }

    /**
     * @return mixed
     */
    public function getCustomerId()
    {
        return $this->customer_id;
    }

    /**
     * @param mixed $customer_id
     */
    public function setCustomerId($customer_id): void
    {
        $this->customer_id = $customer_id;
    }
}